﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <#include "../inc/head.ftl"/>
    <@head/>
</head>
<body>
    <div id="wrapper">
        <#include "../inc/head_nav.ftl"/>
        <@head_nav/>
        <!--/. NAV TOP  -->
        <#include "../inc/nav.ftl"/>
        <@nav/>

        <!-- /. NAV SIDE  -->
        <div id="page-wrapper">
		  <div class="header"> 
                        <h1 class="page-header">
                            服装店POS
                        </h1>
						<ol class="breadcrumb">
					  <li><a href="/index">Home</a></li>
					  <li><a href="#">Bill</a></li>

					</ol> 
									
		</div>
            <div id="page-inner"> 
                <div class="row">
			     <div class="col-md-12">
        			<div class="panel panel-default">
        				<div class="panel-heading">
        				 账单管理
        				</div>        
							  
							<div class="panel-body"> 
								<div class="btn-group">
								   <table width="60%" class="table " >
			                        <tr>
			                            <#--<td width="50px"><button id="addBrand" class="btn btn-success">新增</button></td>-->
                                        <#--<td width="50px"><button id="editBrand" class="btn btn-info">编辑</button></td>-->
                                        <#--<td width="50px"><button id="deleBrand" class="btn btn-danger">删除</button></td>-->

                                    </tr>
                   				 </table>
								</div>
							</div>
				    </div>
			     </div>	
			 </div>	
			 <div class="row">
			     <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                        </div>        
                                      
                        <div class="panel-body">
                            <div class="table-responsive">
                            <table width="100%" class="table table-striped table-bordered table-hover" id="list">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>订单ID</th>
                                        <th>经手人</th>
                                        <th>时间</th>
                                        <th>收取金额</th>
                                        <th>支付方式</th>
                                        <th>描述</th>
                                    </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                            </div>
                	  </div>
            		</div>
                 </div>	
            </div>		
             <!-- /. ROW  -->
				</div>
				
             <!-- /. PAGE INNER  -->
            </div>
         <!-- /. PAGE WRAPPER  -->
        </div>
     <!-- /. WRAPPER  -->
     </div>
    <!-- JS Scripts-->
    <#include "../inc/foot.ftl"/>
    <@foot/>
  <script>
    $(document).ready(function() {
    	var table = $('#list').DataTable({
            dom: 'Bfrtip',
            buttons: [
                {       // 显示文字
                    text:'导出至excel',
                    extend:'excelHtml5',
                    title:'账单统计表',
                    exportOptions: {
                        columns: ':visible'
                    }
                },
                {
                    extend:'colvis',
                    text:'选择不需要导出的列',

                },

            ],
        	"ajax": '/bill/list',
        	"language": {
    			"url": "/vendor/datatables/i18n/Chinese.json"
			},
            "columns": [
                 {"data": "id"},
                {"data": "orderid"},
                {"data": "creatby"},
                {"data": "creatdate"},
                {"data": "sumamount"},
                {"data": "paytype"},
                {"data": "description"}
    	   ],
           responsive: true,
           select: true //datatables select 插件
        });

    	$('#addBrand').click( function () {
    	    layer.msg("hh");
    		layer.open({  //layer弹出层
    			  type: 2,
    			  title:"新增品牌",
    			  area: ['400px', '380px'],
    			  fixed: false, //不固定
    			  maxmin: true,
    			  content: '/brand/add',
    			  end : function(index){
    				  table.ajax.reload();
    			  }
    		});
        } );
    	
    });

    </script>

</body>
</html>
